#ifndef _ST7735SV_H_
#define _ST7735SV_H_

#include "polsys.h"

// ST7789V命令，详细说明见规格书

#define _CMD_SOFT_RESET         0X01
#define _CMD_SLEEP_IN           0X10
#define _CMD_SLEEP_OUT          0X11
#define _CMD_PARTIAL_MODE_ON    0X12    // 局部模式开
#define _CMD_PARTIAL_MODE_OFF   0X13    // 局部模式关，默认
#define _CMD_DIS_INVERSION_OFF  0X20    // 倒置显示关
#define _CMD_DIS_INVERSION_ON   0X21    // 倒置显示开
#define _CMD_DIS_OFF            0X28
#define _CMD_DIS_ON             0X29
#define _CMD_SET_COL_ADDR       0X2A
#define _CMD_SET_ROW_ADDR       0X2B
#define _CMD_WRITE_MEM          0X2C    // 接下来开始写显存数据
#define _CMD_READ_MEM           0X2E    // 接来下开始读显存数据
#define _CMD_SET_PARTIAL_ADDR   0X30
#define _CMD_VERTICAL_SCROLL_DEF    0X33
#define _CMD_TEARING_EFFECT_LINE_OFF    0X34
#define _CMD_TEARING_EFFECT_LINE_ON     0X35
#define _CMD_MEM_ACCESS_CTRL    0X36
#define _CMD_VERTICAL_SCROLL_START_ADDR 0X37
#define _CMD_IDLE_MODE_OFF      0X38
#define _CMD_IDLE_MODE_ON       0X39
#define _CMD_SET_IF_FMT         0X3A
// #define _CMD_CONTINUE_WRITE_MEM 0X3C    // 继续写显存
// #define _CMD_CONTINUE_READ_MEM  0X3E    // 继续读显存
// #define _CMD_SET_TEAR_SCANLINE  0X44
// #define _CMD_SET_BRIGHTNESS     0X51    // 设置 BRIGHTNESS
// #define _CMD_SET_CTRL           0X53
// #define _CMD_SET_CACE           0X55

// #define _CMD_RAM_CTRL           0XB0
// #define _CMD_RGB_CTRL           0XB1
// #define _CMD_PORCH_CTRL         0XB2
// #define _CMD_FRAME_RATE_CTRL1   0XB3
// #define _CMD_GATE_CTRL1         0XB7
// #define _CMD_EN_GAMMA           0XBA
// #define _CMD_SET_VCOM           0XBB
// #define _CMD_LCM_CTRL           0XC0
// #define _CMD_SET_ID             0XC1
// #define _CMD_EN_VDV_VRH         0XC2
// #define _CMD_SET_VRH            0XC3
// #define _CMD_SET_VDV            0XC4
// #define _CMD_SET_VCOM_OFFSET    0XC5
// #define _CMD_FR_CTRL2           0XC6
// #define _CMD_CABC_CTRL          0XC7
// #define _CMD_REG_SEL1           0XC8
// #define _CMD_REG_SEL2           0XCA
// #define _CMD_SET_PWM_FREQ       0XCC
// #define _CMD_POWER_CTRL1        0XD0
// #define _CMD_EN_VAP_VAN_OUT     0XD2
// #define _CMD_EN_CMD2            0XDF
// #define _CMD_PV_GAM_CTRL        0XE0
// #define _CMD_NV_GAM_CTRL        0XE1
// #define _CMD_GAM_TABLE_R        0XE2
// #define _CMD_GAM_TABLE_B        0XE3
// #define _CMD_GATE_CTRL2         0XE4
// #define _CMD_POWER_CTRL2        0XE8
// #define _CMD_EQ_TIME_CTRL       0XE9
// #define _CMD_PROGRAM_CTRL       0XEC
// #define _CMD_EN_PROGRAM_MODE    0XFA
// #define _CMD_SET_NVM            0XFC
// #define _CMD_PROGRAM_ACTION     0XFE




void WriteOneByteCmd(u8 cmd);
void WriteOneByteData(u8 dat);





#endif
